import request from '@/utils/request'
export function getCategoryOne(id) {
  return request.get('/admin/category/one/id/' + id)
}

export function getCategoryTree() {
  return request.get('/admin/category/tree')
}

export function deleteCategory(id) {
  return request.get('/admin/category/remove/id/' + id)
}

export function createCategory(data) {
  return request.post('/admin/category/create', data)
}

export function updateCategory(data, id) {
  return request.post('/admin/category/update/id/' + id, data)
}
